function [discount,beca,stipend] = u36_2012(math,lang,demrecode,his,sci,price,ref)
%% Universidad Catolica de la Santisima Concepcion
lm=(math+lang)/2;
beca=zeros(size(lm,1),1);
stipend=zeros(size(lm,1),1);

%Beca UCSC Puntaje Nacional
discount=((math==850) + (lang==850) + (his==850) + (sci==850))>0;

%Beca Ciencias del Mar
if demrecode==36002 %can't disentangle other sub-majors (Qu'imica Ambiental and Ingenier'ia Civil en Biotecnolog'ia Acu'icola)
    beca=max(0,price-ref)*ones(size(lm,1),1);
end

%BVP
if demrecode==36053 || demrecode==36057 || demrecode==36010 || demrecode==36056 || demrecode==36066 || demrecode==36009 || demrecode==36015 || demrecode==36052 || demrecode==36065
    [auxdiscount,stipend]=bvp(lm);
    discount=max(discount,auxdiscount);
end

end
